package Date_Calendar;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

public class Example7 {
    public static void main(String[] args) {
        LocalDateTime localDateTime = LocalDateTime.now();
        //plusDays(long daysToSubtract)
        LocalDateTime l1 = localDateTime.plusDays(318);
        System.out.println("318天后是什么日子：\n" + l1);
        //这里可以对它进行格式化
        DateTimeFormatter dtf = DateTimeFormatter.ofPattern("yyyy年MM月dd日 E");
        System.out.println(dtf.format(l1));
        System.out.println("==========================");

        //minusDays(long daysToSubtract)
        LocalDateTime l2 = localDateTime.minusDays(548);
        System.out.println("548天前是什么日子：\n" + dtf.format(l2));
    }
}
